

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="adminmain" />
        <title>SMF Administration - Content Management</title>         
    </head>
    <body>

        <div class="body">
        
            <h1>New Success Story</h1>
            
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            
            <g:hasErrors bean="${story}">
				<div class="errors">
					<g:renderErrors bean="${story}" as="list" />
				</div>
            </g:hasErrors>
            
            <g:form action="storySave" method="post" >
            
                <div class="dialog">
                
                    <table>
                   
						<tr class="prop">
							<td valign="top" class="name">
								<label for="title">Title:</label>
							</td>
							<td valign="top" class="value ${hasErrors(bean:story,field:'title','errors')}">
								<input type="text" maxlength="100" id="title" name="title" value="${fieldValue(bean:story,field:'title')}"/>
							</td>
						</tr> 

						<tr class="prop">
							<td valign="top" class="name">
								<label for="videoUrl">Video Url:</label>
							</td>
							<td valign="top" class="value ${hasErrors(bean:story,field:'videoUrl','errors')}">
								<input type="text" maxlength="500" id="videoUrl" name="videoUrl" value="${fieldValue(bean:story,field:'videoUrl')}"/>
							</td>
						</tr>

						<tr class="prop">
							<td valign="top" class="name">
								<label for="enabled">Enabled:</label>
							</td>
							<td valign="top" class="value ${hasErrors(bean:story,field:'enabled','errors')}">
								<g:checkBox name="enabled" value="${story?.enabled}" ></g:checkBox>
							</td>
						</tr> 

						<tr class="prop">
							 <td valign="top" class="name">
								 <label for="body">Introduction:</label>
							 </td>
							 <td valign="top" class="value ${hasErrors(bean:story,field:'introduction','errors')}">
								 <textarea rows="4" cols="60" name="introduction">${story?.introduction?.encodeAsHTML()}</textarea>
							 </td>
						</tr>

						<tr class="prop">
							<td valign="top" class="name">
								<label for="body">Body:</label>
							</td>
							<td valign="top" class="value ${hasErrors(bean:story,field:'body','errors')}">
								<textarea rows="6" cols="60" name="body">${story?.body?.encodeAsHTML()}</textarea>
							</td>
						</tr> 

						<tr class="prop">
							<td valign="top" class="name">
								<label for="defaultPictureName">Default Picture Name:</label>
							</td>
							<td valign="top" class="value ${hasErrors(bean:story,field:'defaultPictureName','errors')}">
								<input type="text" maxlength="100" id="defaultPictureName" name="defaultPictureName" value="${fieldValue(bean:story,field:'defaultPictureName')}"/>
							</td>
						</tr> 

                    </table>
                    
                </div>
                
                <div class="buttons">
                    <span class="button"><input type="submit" value="Create" /></span>
                </div>
                
            </g:form>
            
        </div>
    </body>
</html>
